package com.mipo.collection;

import java.util.HashMap;
import java.util.Hashtable;


public class HashTableMain {
	public static void main(String[] args) {
		
		
		
		
		
		
		
		
		
		
		
		
		HashTableMain htm01 = new HashTableMain();
		HashTableMain htm02 = new HashTableMain();
		HashTableMain htm03 = new HashTableMain();
		int hashCode01 = htm01.hashCode();
		int hashCode02 = htm02.hashCode();
		int hashCode03 = htm03.hashCode();
		System.out.println("hashCode1:" + hashCode01);
		System.out.println("hashCode2:" + hashCode02);
		System.out.println("hashCode3:" + hashCode03);
		String str = new String("hashCode");
		int strHashCode = str.hashCode();
		System.out.println("hashCode2:" + strHashCode);
		
		
		htm01.equals(new Object());
		
		
		Hashtable<String, String> ht = new Hashtable();
		
		ht.put("", "");
		
		String hmstr = new String("443");
		
		
		HashMap<Object, Object> hm = new HashMap<Object, Object>();
		
		hm.put("key01", "jack");
		hm.put("key01", "rose"); // key相同会覆盖
		hm.put("aaa", "lucy");
		hm.put("bbb", "fdhs");
		hm.put("cc", "454");
		hm.put("dd", "fdhs");
		hm.put("ee", "hrt3");
		hm.put("ee2", hmstr);
		hm.put("gga", hmstr);
		hm.put("tyq", null);
		hm.put(null, null);
		hm.put(null, null);
		hm.get("key01");
		System.out.println(hm.size());
		
	}
	
	
}
